﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using DAL.Repositories;

namespace BLL
{
    public class MovieHallCTR //: Interfaces.IMovieHallCTR
    {
        MovieHallRepository _movieHallRep;

        public MovieHallCTR()
        {
            _movieHallRep = new MovieHallRepository();
        }

        /// <summary>
        /// Get movie hall by screen cast
        /// </summary>
        /// <param name="screenCast">Screen cast to find movie hall for</param>
        /// <returns>Movie hall for screen cast</returns>
        /// <exception cref="ArgumentNullException"></exception>
        /// <exception cref="InvalidOperationException"></exception>
        /// <exception cref="Exception"></exception>
        public MovieHall GetMovieHall(ScreenCast screenCast)
        {
            return _movieHallRep.GetMovieHall(screenCast);
        }

        /// <summary>
        /// Get movie hall from id
        /// </summary>
        /// <param name="id">Id of movie hall</param>
        /// <returns>Movie hall with id</returns>
        /// <exception cref="ArgumentNullException"></exception>
        /// <exception cref="InvalidOperationException"</exception>
        /// <exception cref="Exception"></exception>
        public MovieHall GetMovieHall(int id)
        {
            return _movieHallRep.GetMovieHall(id);
        }

        /// <summary>
        /// Get all movie halls in cinema
        /// </summary>
        /// <param name="cinema">Cinema to get movie halls from</param>
        /// <returns>Movie halls in cinema</returns>
        /// <exception cref="ArgumentNullException"></exception>
        /// <exception cref="Exception"></exception>
        public IList<MovieHall> GetMovieHalls(Cinema cinema)
        {
            return _movieHallRep.GetMovieHalls(cinema);
        }
    }
}
